package org.datascooter.utils.policy;

public enum Aggregate {
	GROUP_BY, HAVING, IN, NOT_IN;

	@SuppressWarnings("nls")
	public static String toString(Aggregate function, String field) {
		if (function == null) {
			return "";
		}
		switch (function) {
			case GROUP_BY:
				return "GROUP BY " + field;
			case HAVING:
				return "HAVING " + field;
			case IN:
				return "IN( " + field + " )";
			case NOT_IN:
				return "NOT IN( " + field + " )";
		}
		return "";
	}
}
